var scroll = document.querySelector("#scroll");

var koa = document.querySelector(".koa");
window.onscroll = function () {


    var t = document.documentElement.scrollTop || document.body.scrollTop;
    // console.log(t);
    if (t > 400) {
        scroll.classList.add("active");
    } else {

        scroll.classList.remove("active");
    }


    var w = document.documentElement.scrollTop || document.body.scrollTop;
    // console.log(w);
    if (w > 300) {
        // koa.classList.add("active");
        koa.style.display = 'block';
    } else {
        // koa.classList.remove("active");
        koa.style.display = 'none';
    }
}

var  ck2=document.querySelectorAll(".ck-21");
var sola = document.querySelectorAll(".sola");
var ck = document.querySelectorAll(".ck-1");
var v = document.querySelectorAll(".v");
var cq = document.querySelectorAll(".cq");
for (var i = 0; i < v.length; i++) {
    v[i].index = i;
    v[i].addEventListener('click',function(){
        console.log(this.index);
        cq[this.index].style.display = "block";
        ck[this.index].style.display = "none";
        ck2[this.index].style.display = "none";
    });
    //收起的内容
    sola[i].index = i;
    sola[i].addEventListener('click',function () {
        ck[this.index].style.display = "block";
        ck2[this.index].style.display = "block";
        cq[this.index].style.display = "none";
    })

}